﻿@{
    ViewBag.Title = "ArticleList";
    string categoryId = this.ViewContext.RouteData.GetRequiredString("id");
    PlaceInfo objSearchRecommend = ViewBag.SearchRecommend as PlaceInfo;
    string searchRecommend = objSearchRecommend != null ? objSearchRecommend.InfoTitle : "";
    List<CategoryInfo> objCategoryInfoList = ViewBag.CategoryInfoList as List<CategoryInfo>;
}
@model CategoryInfo
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Cache-control" content="max-age=1700">
    <meta name="viewport" content="user-scalable=no, width=device-width">
    <meta content="新闻,时事,时政,国际,国内,社会,法治,评论,专题,图片,军事,节操新闻" name="keywords">
    <meta content="手机腾讯网新闻中心是手机腾讯网最重要的频道之一，24小时滚动报道国内、国际及社会新闻。每日编发新闻数以万计。手机腾讯网 - 4g.qq.com" name="description">
    <meta name="MobileOptimized" content="320">
    <meta name="format-detection" content="telephone=no">
    <link rel="apple-touch-icon-precomposed" href="http://3gimg.qq.com/wap30/info/info5/img/logo_icon.png">
    <link href="/content/resources/community/css/common.css" rel="stylesheet" type="text/css">
    <link href="/content/resources/community/css/touch_base.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/content/js/jquery-1.8.2.min.js"></script>
    <script src="/content/js/idangerous.swiper.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/content/resources/community/js/touch_base.js"></script>
    <script type="text/javascript" src="~/content/js/common.js"></script>
    <script type="text/javascript" src="/content/resources/community/js/binddata.js"></script>
    <title>@Model.CategoryName</title>
</head>
<body>
    <div class="wrapper skinnba-wrapper">
        <div class="module module-margin">
            <div class="mod-headline-main">
                <a href="/news" class="logo-tencent"></a>
                <a href="#"><span>@Model.CategoryName</span></a><a href="#" class="btn-menu"></a>
                <script>initHeadTop()</script>
            </div>
        </div>
        @Html.Partial("CategoryList", objCategoryInfoList)
        <div class="module module-margin">
            @Html.Action("SlidesModule", "News", new { placeConfigID = 1 })
            <div id="div_articlelist" style="display:none;">
                <ul class="mod-graphic-list2"></ul>
                <a id="view_more" class="btn-gray" onclick="BindArticleList();">查看更多</a>
            </div>
        </div>
        @Html.Partial("CategoryList", objCategoryInfoList)
    </div>
    <!-- div class="to-index"><a href="javascript:void(0);" onclick="goTop()">回到顶部</a></div-->
    <!--页脚-->
    <!--页脚-->
    <style type="text/css">
        footer {
            border-top: none;
            -webkit-background-clip: border-box;
            background-color: #1c63cf;
            background-image: none;
            text-align: center;
            padding-top: 20px;
            padding-bottom: 20px;
            position: relative;
        }

            footer, footer a {
                color: white;
                text-decoration: none;
                font-size: 16px;
            }

        .copyright {
            color: rgba(255,255,255,.77);
            font-size: 12px;
            height: 22px;
            line-height: 22px;
            padding: 0 12px;
        }

        footer nav {
            margin-bottom: 25px;
            font-size: 0;
            white-space: nowrap;
        }

            footer nav a {
                display: inline-block;
                height: 30px;
                line-height: 30px;
                width: 80px;
                position: relative;
                margin: 0;
            }

                footer nav a::after {
                    content: "";
                    background-color: #164fa6;
                    height: 20px;
                    width: 1px;
                    position: absolute;
                    left: 0;
                    top: 6px;
                }

                footer nav a:first-child::after {
                    display: none;
                }

        footer .search {
            margin: 0 12px 20px;
        }

        footer .search-form {
            background-color: #FFF;
            -webkit-border-radius: 1px;
            height: 38px;
            line-height: 38px;
            display: -webkit-box;
            position: relative;
            border: 1px solid #D1D1D1;
            margin: 0;
        }

        footer .search-logo {
            display: block;
            height: 38px;
            /*padding: 0 10px;*/
            line-height: 38px;
            text-align: center;
            -webkit-box-pack: center;
        }

        footer .sogou {
            background: rgba(0,0,0,0) url() no-repeat 0 center;
            -webkit-background-size: 21px 22px;
            display: inline-block;
            height: 38px;
            width: 22px;
        }

        footer .search-input {
            border: 0 none;
            -webkit-box-flex: 1;
            display: block;
            height: 38px;
            font-size: 15px;
            color: #1d1d1d;
        }

            footer .search-input::focus {
                color: black;
            }

        footer .search-reset {
            background: url() no-repeat;
            -webkit-background-size: 17px 17px;
            position: absolute;
            right: 60px;
            height: 17px;
            width: 17px;
            border: 0 none;
            top: 7px;
        }

        footer .search-btn {
            width: 48px;
            height: 38px;
            line-height: 38px;
            border: 0 none;
            border-left: 1px solid #D1D1D1;
            background: #F9F9F8 url() no-repeat center;
            -webkit-background-size: 21px 22px;
            color: #2b73df;
            font-size: 17px;
            ;
        }
    </style>
    <footer>
        <!--div class="search">
            <form id="search-form" method="POST" action="" class="search-form">
                <div id="logo-list" class="search-select">
                    <a data-value="baidu" class="baidu">百度</a>
                    <a data-value="sogou" class="sogou">搜狗</a>
                </div>
                <a class="search-logo" data-href="http://m.sogou.com/?&pid=sogou-site-334467d41d5cf21e-0003&e=1409&rfrom=3gqq_logout_direct"><span id="search-logo" class="sogou"></span>
                </a>
                <div id="search-hidden-params">
                    <input type="hidden" />
                    <input type="hidden" />
                </div>
                <input id="search-word" type="text" class="search-input"
                    value="三网融合推广方案" />
                <input id="search-reset" type="reset" value="" class="search-reset" />
                <button type="submit" class="search-btn"></button>
            </form>
        </div-->
        <div class="search">
            <form id="search-form" method="GET" action="" class="search-form">
                <a class="search-logo" data-href="http://m.sogou.com/?&amp;pid=sogou-site-334467d41d5cf21e-0003&amp;e=1409&amp;rfrom=3gqq_logout_direct">
                    @*<span id="search-logo" class="sogou"></span>*@
                </a>
                <div id="search-hidden-params">
                    <input type="hidden">
                    <input type="hidden">
                </div>
                <input id="search-word" type="text" class="search-input" value="@searchRecommend" onfocus="this.value='';">
                <button type="submit" class="search-btn"></button>
            </form>
        </div>
        <nav>
            <a href="/g/s?aid=index">首页</a>
            <a href="http://infoapp.3g.qq.com/g/s?aid=user_subshow&amp;icfa=home_touch">个人中心</a>
            <a href="http://infoapp.3g.qq.com/g/s?aid=touchmsg&amp;pt=59&amp;backurl=http%3A%2F%2Finfo.3g.qq.com%2Fg%2Ftemplate_info_page%2Ftemplate_wap3.jsp%3Faid%3Dinfocenter%26iarea%3D84%26i_f%3D166%26sid%3D">反馈</a>
            <a id="footer-login" href="javascript:void(0);">登录</a>
        </nav>
        <div class="copyright">
            ©2015 Tencent 粤B2-20090028
        </div>
    </footer>
    <div id="nav-pop" class="nav-pop" style="display: none;">
        <div id="nav-pop-pnl" class="nav-top">
            <div class="nav-box">
                <h3>
                    <span>频道</span>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=navigation&amp;iarea=101">网站导航</a>
                </h3>
                <div class="channel-list">
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=infocenter&amp;iarea=101">新闻</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=ent_h&amp;iarea=101">娱乐</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=sports_h&amp;iarea=101">体育</a>
                    <a href="http://gp.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=finance_h&amp;iarea=101">财经</a>
                    <a href="http://gp.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=stock_h&amp;iarea=101">股票</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=tech_h&amp;iarea=101">科技</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=mili_h&amp;iarea=101">军事</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=auto_h&amp;iarea=101">汽车</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=mobile_h&amp;iarea=101">手机</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=digi_h&amp;iarea=101">数码</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=lady_h&amp;iarea=101">女性</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=astro_h&amp;iarea=101">星座</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=qinggan_h&amp;iarea=101">情感</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=edu_h&amp;iarea=101">校园</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=joke_h&amp;iarea=101">笑话</a>
                </div>
            </div><div class="nav-box">
                <h3>
                    <span>网页应用</span>
                </h3>
                <div class="app-list">
                    <a href="http://infoapp.3g.qq.com/g/s?aid=nbasearch&amp;icfa=home_touch&amp;iarea=101&amp;sid=undefined#home">NBA</a>
                    <a href="http://info.3g.qq.com/g/s?aid=image&amp;iarea=101&amp;sid=undefined">悦图</a>
                    <a href="http://infoapp.3g.qq.com/g/s?aid=astro&amp;g_ut=3&amp;iarea=101&amp;sid=undefined#home">爱星座</a>
                    <a href="http://infoapp.3g.qq.com/g/s?sid=undefined&amp;aid=movie">爱电影</a>
                    <a href="http://infoapp.3g.qq.com/g/s?aid=medialib&amp;iarea=101&amp;sid=undefined">悦读</a>
                    <a href="http://infoapp.3g.qq.com/g/s?aid=touchauto&amp;iarea=101&amp;sid=undefined">车典</a>
                    <a href="http://infoapp.3g.qq.com/g/s?sid=undefined&amp;aid=carshow&amp;iarea=101">秀车</a>
                    <a href="http://live.3g.qq.com/g/touch2/?iarea=101#home/sid=undefined">爱直播</a>
                    <a href="http://gp.3g.qq.com/g/stock/wap3/index.jsp?action=getPortfolios&amp;iarea=101&amp;sid=undefined#page=MyStock">自选股</a>
                    <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=qqvideo&amp;g_ut=3">爱播</a>
                </div>
            </div>
        </div><div id="nav-pop-mask" class="pop-layer"></div>
    </div>
    <div id="wwei_dialog"></div>
    <div id="nav-pop" class="nav-pop" style="display: none;"><div id="nav-pop-pnl" class="nav-top"><div class="nav-box"><h3><span>频道</span> <a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=navigation&amp;iarea=101">网站导航</a></h3><div class="channel-list"><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=infocenter&amp;iarea=101">新闻</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=ent_h&amp;iarea=101">娱乐</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=sports_h&amp;iarea=101">体育</a><a href="http://gp.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=finance_h&amp;iarea=101">财经</a><a href="http://gp.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=stock_h&amp;iarea=101">股票</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=tech_h&amp;iarea=101">科技</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=mili_h&amp;iarea=101">军事</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=auto_h&amp;iarea=101">汽车</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=mobile_h&amp;iarea=101">手机</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=digi_h&amp;iarea=101">数码</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=lady_h&amp;iarea=101">女性</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=astro_h&amp;iarea=101">星座</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=qinggan_h&amp;iarea=101">情感</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=edu_h&amp;iarea=101">校园</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=joke_h&amp;iarea=101">笑话</a></div></div><div class="nav-box"><h3><span>网页应用</span></h3><div class="app-list"><a href="http://infoapp.3g.qq.com/g/s?aid=nbasearch&amp;icfa=home_touch&amp;iarea=101&amp;sid=undefined#home">NBA</a><a href="http://info.3g.qq.com/g/s?aid=image&amp;iarea=101&amp;sid=undefined">悦图</a><a href="http://infoapp.3g.qq.com/g/s?aid=astro&amp;g_ut=3&amp;iarea=101&amp;sid=undefined#home">爱星座</a><a href="http://infoapp.3g.qq.com/g/s?sid=undefined&amp;aid=movie">爱电影</a> <a href="http://infoapp.3g.qq.com/g/s?aid=medialib&amp;iarea=101&amp;sid=undefined">悦读</a><a href="http://infoapp.3g.qq.com/g/s?aid=touchauto&amp;iarea=101&amp;sid=undefined">车典</a><a href="http://infoapp.3g.qq.com/g/s?sid=undefined&amp;aid=carshow&amp;iarea=101">秀车</a><a href="http://live.3g.qq.com/g/touch2/?iarea=101#home/sid=undefined">爱直播</a><a href="http://gp.3g.qq.com/g/stock/wap3/index.jsp?action=getPortfolios&amp;iarea=101&amp;sid=undefined#page=MyStock">自选股</a><a href="http://info.3g.qq.com/g/s?sid=undefined&amp;aid=template&amp;tid=qqvideo&amp;g_ut=3">爱播</a></div></div></div><div id="nav-pop-mask" class="pop-layer"></div></div><div id="wwei_dialog"></div>
    <div id="jumphelper" style="display: block;"><a onclick="javascript:void 0;" id="gotop">∧</a><a onclick="javascript:void 0;" id="gobot">∨</a></div>
    <script type="text/javascript">
        var pageIndex = 1;
        $(function () {
            init_slide_banner();
            BindArticleList();
        });
        /**
         * 初始化Banner轮播
         */
        function init_slide_banner() {
            var $slide = $("#j_slide_banner");
            if ($slide.length == 0) {
                return;
            }

            $slide.swiper({
                pagination: '.slide-banner-pagination',
                autoplay: 3000,
                autoplayDisableOnInteraction: false,
                calculateHeight: true
            });
            //$(window).on("resize", function () {
            //    $("#j_slide_banner").data("swiper").reInit();
            //});
        }

        function BindArticleList(pageSize) {
            if (!pageSize) {
                pageSize = 10;
            }
            var objAjaxEntity = new AjaxEntity();
            objAjaxEntity.url = "/news/getarticlelist";
            objAjaxEntity.data = {
                categoryId: "@categoryId",
                pageIndex: pageIndex,
                pageSize: pageSize
            };
            objAjaxEntity.executeSuccess = function (objInvokeResult) {
                if (objInvokeResult.ResultCode == "ArticleInfoNull") {
                    if (pageIndex == 1) {
                        $("#div_articlelist").hide();
                    } else {
                        $("#view_more").html("没有更多数据了");
                    }
                    $("#view_more").removeAttr("onclick");
                    return;
                }
                if (objInvokeResult.ResultCode != "Success") {
                    alert(objInvokeResult.ResultMessage);
                    return;
                }
                if (pageIndex == 1) {
                    $("#div_articlelist").show();
                    if (objInvokeResult.Data.length < 10) {
                        $("#view_more").html("没有更多数据了");
                        $("#view_more").removeAttr("onclick");
                    }
                }
                var html = "";
                $.each(objInvokeResult.Data, function (i, item) {
                    html += CreateArticleHtml(item);
                });
                $("#div_articlelist ul").append(html)
                pageIndex++;
            }
            objAjaxEntity.execute();
        }
    </script>
</body>
</html>
